import request from '@/utils/request'

// 查询骑手主列表
export function listDelivery(query) {
  return request({
    url: 'admin/platform/delivery/personnel/list',
    method: 'get',
    params: query
  })
}// 查询骑手信息主详细
// export function getRoom(id) {
//     return request({
//       url: 'admin/platform/room/' + id,
//       method: 'get'
//     })
//   }
  
  // 新增骑手信息主
  export function addDelivery(data) {
    return request({
      url: 'admin/platform/delivery/personnel/save',
      method: 'post',
      data: data
    })
  }
  
  // 修改骑手信息主
  export function updateDelivery(data) {
    return request({
      url: 'admin/platform/delivery/personnel/update',
      method: 'post',
      data: data
    })
  }
  
  // 删除骑手信息主
  export function delDelivery(id) {
    return request({
      url: 'admin/platform/delivery/personnel/delete/' + id,
      method: 'POST'
    })
  }
  
  //仓库表分页列表
  export function listWarehouse(query) {
    return request({
      url: 'admin/platform/warehouse/list',
      method: 'get',
      params: query
    })
  }
 // 仓库表新增
 export function addWarehouse(data) {
  return request({
    url: 'admin/platform/warehouse/save',
    method: 'post',
    data: data
  })
 }
 //删除仓库表
 export function delWarehouse(id) {
  return request({
    url: 'admin/platform/warehouse/delete?id=' + id,
    method: 'get',
  })
 }
 //修改仓库表
 export function updateWarehouse(data) {
  return request({
    url: 'admin/platform/warehouse/update',
    method: 'post',
    data: data
  })
 }